home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * This file was generated by the SOM Compiler.
- * Generated using:
- * SOM incremental update: somc/smmain.c
- */
-
-
- /*
- File: SemtIntB.cpp
-
- Contains: Implementation of platform-independent ODSemanticInterface
- class.
-
- Owned by: Nick Pilch
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <21> 10/8/95 TJ Fixes Recomended by Refball
- <20> 8/23/95 NP 1276287: Move constant kODAppShell.
- <19> 8/16/95 NP 1275241: IDL Review. Remove unnecessary
- overrides.
- <18> 8/12/95 TÇ 1276806 Optimization: use kODFalse instead
- of kODTrue in comparisons
- <17> 8/7/95 NP 1275105: Exception safety.
- <16> 8/3/95 RR #1257260: Collapse B classes. Remove
- somInit methods. Don't call IsInitialized
- or SubclassResponsibility
- <15> 6/20/95 JP 1251250: Removed ReleaseExtension method
- <14> 6/19/95 eeh 1259707: SIHelper needs to return
- errAEEventNotHandled
- <13> 5/21/95 NP 1249232: Gid rid of TokenInquiryProc.
- 1250474: Change to CallGetMarkTokenProc.
- 1248779: Change API of GetUserToken.
- 1250590: Add default behavior to
- ODSemanticInterface.
- <12> 5/4/95 eeh 1243497: implement ReleaseExtension
- <11> 4/28/95 eeh 1244258: : override BaseRemoved, IsValid,
- and CheckValid
- <10> 1/27/95 NP 1213948: New classes for ODDesc et al.
- <9> 1/25/95 eeh 1214626: API change: remove SetTerminology
- and GetTerminology
- <8> 1/9/95 NP 1194880: SemtIntf name changes.
- <7> 10/12/94 RA #1189812: Prevents incomplete cast #warning
- 18.
- <6> 9/29/94 RA 1189812: Mods for 68K build.
- <5> 9/9/94 NP 1185851: implement scripting. 1184040: API
- changes.
- <4> 9/9/94 jpa Removed call to parent in Release, at
- Nick's suggestion. [1185656]
- <3> 8/13/94 NP 1180819-Added Get/SetTerminology and
- ForwardEvent.,
- <2> 7/8/94 NP Fixed initialization.
- <1> 7/1/94 NP first checked in
-
- To Do:
- */
-
- #ifndef SOM_ODMessageInterface_xh
- #include "MssgIntf.xh"
- #endif
-
- #ifndef SOM_ODSession_xh
- #include "ODSessn.xh"
- #endif
-
- #define VARIABLE_MACROS
- #define ODSemanticInterface_Class_Source
- #include <SemtIntB.xih>
-
- #ifndef SOM_ODPart_xh
- #include "Part.xh"
- #endif
-
- #ifndef SOM_ODPart_xh
- #include "Part.xh"
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdDefs_defined
- #include <StdDefs.xh>
- #endif
-
- #if 0
- //------------------------------------------------------------------------------
- // ODSemanticInterface::somUninit
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfacesomUninit(ODSemanticInterface *somSelf)
- {
- /* ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf); */
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfacesomUninit");
-
- ODSemanticInterface_parents_somUninit(somSelf);
- }
- #endif /* 0 */
- //------------------------------------------------------------------------------
- // ODSemanticInterface::BaseRemoved
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceBaseRemoved(ODSemanticInterface *somSelf, Environment *ev)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceBaseRemoved");
-
- SOM_TRY
-
- _fIsValid = kODFalse;
- ODSemanticInterface_parents_BaseRemoved(somSelf, ev);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::IsValid
- //------------------------------------------------------------------------------
-
- SOM_Scope ODBoolean SOMLINK ODSemanticInterfaceIsValid(ODSemanticInterface *somSelf, Environment *ev)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceIsValid");
-
- return _fIsValid;
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CheckValid
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCheckValid(ODSemanticInterface *somSelf, Environment *ev)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCheckValid");
-
- if ( !_fIsValid )
- ODSetSOMException( ev, kODErrInvalidExtension );
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::Release
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceRelease(ODSemanticInterface *somSelf, Environment *ev)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceRelease");
-
- SOM_TRY
-
- ODBoolean shouldDelete = kODFalse;
-
- if (somSelf->GetRefCount(ev) == 1 && somSelf->GetBase(ev) == kODAppShell)
- shouldDelete = kODTrue;
-
- ODSemanticInterface_parent_ODExtension_Release(somSelf,ev);
-
- if (shouldDelete)
- ODDeleteObject(somSelf);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::InitSemanticInterface
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceInitSemanticInterface(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* base,
- ODSession* session)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceInitSemanticInterface");
-
- /* Moved from somInit. SOM itself sets fields to zero
- _fIsValid = kODFalse;
- _fFlags = 0;
- _fMessageInterface = kODNULL;
- */
-
- SOM_TRY
- somSelf->InitExtension(ev, (ODObject*)base);
- _fIsValid = kODTrue;
- _fMessageInterface = session->GetMessageInterface(ev);
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallEventHandler
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallEventHandler(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODAppleEvent* theODAppleEvent,
- ODAppleEvent* reply)
- {
- /* ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf); */
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallEventHandler");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallCoercionHandler
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallCoercionHandler(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODDesc* theODDesc,
- ODDescType toType,
- ODDesc* result)
- {
- /* ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf); */
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallCoercionHandler");
-
- ODSetSOMException(ev, errAECoercionFail);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallObjectAccessor
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallObjectAccessor(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODDescType desiredClass,
- ODOSLToken* container,
- ODDescType containerClass,
- ODDescType form,
- ODDesc* selectionData,
- ODOSLToken* value)
- {
- /* ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf); */
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallObjectAccessor");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallPredispatchProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallPredispatchProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODAppleEvent* theODAppleEvent,
- ODAppleEvent* reply)
- {
- /* ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf); */
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallPredispatchProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallCompareProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallCompareProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODDescType oper,
- ODOSLToken* obj1,
- ODOSLToken* obj2,
- ODBoolean* result)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallCompareProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallCallCountProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallCountProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODDescType desiredType,
- ODDescType containerClass,
- ODOSLToken* container,
- ODSLong* result)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallCountProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallDisposeTokenProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallDisposeTokenProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODOSLToken* unneededToken)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallDisposeTokenProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallGetErrDescProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallGetErrDescProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODDesc** errDesc)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallGetErrDescProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallGetMarkTokenProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallGetMarkTokenProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODOSLToken* dContainerToken,
- ODDescType containerClass,
- ODOSLToken* result)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallGetMarkTokenProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallMarkProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallMarkProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODOSLToken* dToken,
- ODOSLToken* markToken,
- ODSLong index)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallMarkProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::CallAdjustMarksProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceCallAdjustMarksProc(ODSemanticInterface *somSelf, Environment *ev,
- ODPart* thePart,
- ODSLong newStart,
- ODSLong newStop,
- ODOSLToken* markToken)
- {
- // ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceCallAdjustMarksProc");
-
- ODSetSOMException(ev, errAEEventNotHandled);
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::GetOSLSupportFlags
- //------------------------------------------------------------------------------
-
- SOM_Scope ODSShort SOMLINK ODSemanticInterfaceGetOSLSupportFlags(ODSemanticInterface *somSelf, Environment *ev)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceGetOSLSupportFlags");
-
- return _fFlags;
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::SetOSLSupportFlags
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceSetOSLSupportFlags(ODSemanticInterface *somSelf, Environment *ev,
- ODSShort flags)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceSetOSLSupportFlags");
-
- _fFlags = flags;
- }
-
- //------------------------------------------------------------------------------
- // ODSemanticInterface::UsingPredispatchProc
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODSemanticInterfaceUsingPredispatchProc(ODSemanticInterface *somSelf, Environment *ev,
- ODBoolean usingNotUsing)
- {
- ODSemanticInterfaceData *somThis = ODSemanticInterfaceGetData(somSelf);
- ODSemanticInterfaceMethodDebug("ODSemanticInterface","ODSemanticInterfaceUsingPredispatchProc");
-
- SOM_TRY
-
- if (usingNotUsing != kODFalse)
- _fMessageInterface->PreHandlerAdded(ev, somSelf, 0);
- else
- _fMessageInterface->PreHandlerRemoved(ev, somSelf, 0);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
-